package com.lin.linchatgpt.openai.server;

import com.lin.linchatgpt.entity.dto.MessageDTO;
import com.unfbx.chatgpt.entity.billing.Subscription;
import com.unfbx.chatgpt.entity.chat.Message;
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter;

import java.util.List;

/**
 * Copyright(C),2022年-2022,霖霖
 *
 * @author 霖霖
 * @version 1.0
 * @date 2023/6/3 11:13
 * @Description 聊天服务
 */
public interface ChatMessageService {

    Subscription validApiKey(String apikey);
    /**
     * @description 聊天发送
     * @author 霖霖
     * @date 2023/6/22 19:27
     * @params  [com.lin.linchatgpt.entity.Message]
     * @return  org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter
     */
    ResponseBodyEmitter sendMessage(MessageDTO messageDTO);
    /**
     * @description 修改聊天记录后，发送请求，
     * @author 霖霖
     * @date 2023/6/22 19:27
     * @params  [java.util.List<com.lin.linchatgpt.entity.Message>]
     * @return  org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter
     */
    ResponseBodyEmitter sendMessage(List<com.lin.linchatgpt.entity.Message> messages);
}
